dojo.declare("DAdminOrderDetailsByVendorRange", wm.Page, {
start: function() {
},
"preferredDevice": "desktop",
svVendorOrderDetailsResult: function(inSender, inDeprecated) {
var totalPrice = 0;
for (var count = 0; count < this.svVendorOrderDetails.getCount(); count++) {
var rowObj = this.svVendorOrderDetails.getItem(count).data;
totalPrice = totalPrice + rowObj.price;
}
this.labelTotal.setCaption(totalPrice.toFixed(2) + " Rs");
},
_end: 0
});

DAdminOrderDetailsByVendorRange.widgets = {
svVendorOrderDetails: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"vendorOrderDetailsByRange","service":"serviceliveDB"}, {"onResult":"svVendorOrderDetailsResult"}, {
input: ["wm.ServiceInput", {"type":"vendorOrderDetailsByRangeInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"startDate.dataValue","targetProperty":"startDate"}, {}],
wire1: ["wm.Wire", {"expression":undefined,"source":"endDate.dataValue","targetProperty":"endDate"}, {}],
wire2: ["wm.Wire", {"expression":undefined,"source":"selectMenu1.selectedItem.customerId","targetProperty":"customerId"}, {}]
}]
}]
}],
lvVendors: ["wm.LiveVariable", {"inFlightBehavior":"executeLast","type":"com.servicelivedb.data.Customer"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"VENDOR\"","targetProperty":"filter.type"}, {}]
}],
liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Customer","view":[
{"caption":"CustomerId","sortable":true,"dataIndex":"customerId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"Address","sortable":true,"dataIndex":"address","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null},
{"caption":"Email","sortable":true,"dataIndex":"email","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":2,"subType":null},
{"caption":"UpdatedDt","sortable":true,"dataIndex":"updatedDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":3,"subType":null},
{"caption":"UpdatedBy","sortable":true,"dataIndex":"updatedBy","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":4,"subType":null},
{"caption":"Active","sortable":true,"dataIndex":"active","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":5,"subType":null},
{"caption":"Password","sortable":true,"dataIndex":"password","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":6,"subType":null},
{"caption":"Username","sortable":true,"dataIndex":"username","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":7,"subType":null},
{"caption":"Name","sortable":true,"dataIndex":"name","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":8,"subType":null},
{"caption":"PrimaryPhone","sortable":true,"dataIndex":"primaryPhone","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":9,"subType":null},
{"caption":"SecondaryPhone","sortable":true,"dataIndex":"secondaryPhone","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":10,"subType":null},
{"caption":"Type","sortable":true,"dataIndex":"type","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":11,"subType":null},
{"caption":"AlternateContact","sortable":true,"dataIndex":"alternateContact","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":12,"subType":null},
{"caption":"Pto","sortable":true,"dataIndex":"pto","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":13,"subType":null},
{"caption":"PtoMessage","sortable":true,"dataIndex":"ptoMessage","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":14,"subType":null}
]}, {}]
}],
layoutBox1: ["wm.Layout", {"autoScroll":false,"border":"1","horizontalAlign":"left","verticalAlign":"top"}, {}, {
panel1: ["wm.HeaderContentPanel", {"height":"30px","horizontalAlign":"center","layoutKind":"left-to-right","verticalAlign":"top","width":"100%"}, {}, {
selectMenu1: ["wm.SelectMenu", {"caption":"Vendor","dataField":"customerId","dataType":"com.servicelivedb.data.Customer","dataValue":undefined,"displayField":"name","displayValue":"","height":"100%"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"lvVendors","targetProperty":"dataSet"}, {}]
}]
}],
startDate: ["wm.Date", {"border":"0","caption":"Date Range From","captionSize":"150px","dataValue":undefined,"displayValue":"","height":"100%","width":"266px"}, {}],
endDate: ["wm.Date", {"border":"0","caption":"Date Range To","captionSize":"130px","dataValue":undefined,"displayValue":"","height":"100%","width":"250px"}, {}]
}],
panel2: ["wm.Panel", {"autoScroll":true,"height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","verticalAlign":"top","width":"100%"}, {}, {
dojoGrid1: ["wm.DojoGrid", {"columns":[
{"show":true,"field":"customerName","title":"Customer","width":"100%","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"status","title":"Order Status","width":"100px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"price","title":"Price","width":"100px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":true,"field":"blockName","title":"Address","width":"100%","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"expression":" \"<div class='MobileRow'>Block/Door: \" + ${blockName} +\" / \"+ ${doorName}+ \"</div>\"\n+ \"<div class='MobileRow'> \" + ${address} + \"</div>\"\n+ \"<div class='MobileRow'>ContactNum: \" + ${contactNum} + \"</div>\"","mobileColumn":false},
{"show":false,"field":"doorName","title":"DoorName","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"vendorId","title":"VendorId","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"customerId","title":"CustomerId","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"address","title":"Address","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"contactNum","title":"ContactNum","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"orderDt","title":"OrderDt","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"comment","title":"Comment","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"orderId","title":"OrderId","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"PHONE COLUMN","title":"-","width":"100%","align":"left","editorProps":{"restrictValues":true},"expression":"\"<div class='MobileRowTitle'>\" +\n\"Customer: \" + ${customerName} +\n\"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Order Status: \" + ${status}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Price: \" + ${price}\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"Address: \" + ${wm.runtimeId}.formatCell(\"blockName\", ${blockName}, ${this}, ${wm.rowId})\n + \"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"VendorName: \" + ${vendorName}\n + \"</div>\"\n\n","mobileColumn":true},
{"show":true,"field":"vendorName","title":"VendorName","width":"100%","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false}
],"dsType":"com.servicelivedb.data.output.VendorOrderDetailsByRangeRtnType","height":"100%","minDesktopHeight":60,"selectionMode":"none"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"svVendorOrderDetails","targetProperty":"dataSet"}, {}]
}]
}]
}],
panel3: ["wm.Panel", {"height":"28px","horizontalAlign":"left","layoutKind":"left-to-right","verticalAlign":"top","width":"100%"}, {}, {
button1: ["wm.Button", {"border":"1","caption":"Generate Report","height":"100%","width":"150px"}, {"onclick":"svVendorOrderDetails"}],
label1: ["wm.Label", {"align":"right","caption":"Order Total :","height":"100%","padding":"4","styles":{"fontWeight":"bolder","fontSize":"20px"},"width":"100%"}, {}],
labelTotal: ["wm.Label", {"caption":"0 Rs","height":"100%","padding":"4","styles":{"fontWeight":"bolder","fontSize":"20px","color":"#e12828"},"width":"100%"}, {}]
}]
}]
};

DAdminOrderDetailsByVendorRange.prototype._cssText = '';
DAdminOrderDetailsByVendorRange.prototype._htmlText = '';